﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Slf.Samples.HidingSlfDependencies
{
  /// <summary>
  /// This is basically a second façade wrapped around SLF, thus
  /// allowing you to minimize dependencies on SLF to this single
  /// class and providing your own API.
  /// Should you every decide to dump SLF, you only need
  /// to change this class and you are done.
  /// 
  /// For simplicity, this class just provides a subset of three simple
  /// logging methods.
  /// </summary>
  public static class InternalLoggerService
  {
    static InternalLoggerService()
    {
      //for simplicity, let's just plug in a console logger
      //right in the constructor of the service
      LoggerService.SetLogger(new ConsoleLogger());
    }



    public static void LogInfo(string message)
    {
      LoggerService.GetLogger().Info(message);
    }


    public static void LogWarning(string message)
    {
      LoggerService.GetLogger().Warn(message);
    }


    public static void LogError(string message)
    {
      LoggerService.GetLogger().Error(message);
    }
  }
}